module.exports = app => {
    const { router, controller } = app;
    const va = app.middleware.user.validateAdmin();

    // 获取后台一级分类列表
    router.get('/category/list', va, controller.category.list);

    // 获取后台二级分类列表
    router.get('/category/subList', va, controller.category.subList);

    // 获取前台一级分类列表
    router.get('/category/fontList', controller.category.fontList);

    // 获取前台二级分类列表
    router.get('/category/fontSubList', controller.category.fontSubList);

    // 添加分类
    router.post('/category/add', va, controller.category.add);

    // 修改分类
    router.post('/category/update', va, controller.category.update);

    // 删除分类
    router.get('/category/delete', va, controller.category.delete);

    // 修改分类显示状态
    router.post('/category/show', va, controller.category.show);
}